﻿<%@ Page Title="" Language="C#" MasterPageFile="~/agr.Master" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="jnagr.Web.sicpet.index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

     <script type="text/javascript">
         $(function () {
             var h = $("body").height() - 100;
             $(".content").height(h);
             $(".mypt").height(h - 260);
             $('#tt').datagrid({ height:h-200 });
             InitGird();
             InitSearch();
             InitTree();
         });
         function InitSearch() {
             $("#ipt_search").searchbox({
                 width: 100,
                 //iconCls: 'icon-save',
                 searcher: function (val, name) {
                     $('#tt').datagrid('options').queryParams.search_type = name;
                     $('#tt').datagrid('options').queryParams.search_value = val;
                     $('#tt').datagrid('reload');
                 },
                 prompt: '请输入查询信息'
             });
         }
         //初始化表格
         function InitGird() {
             $('#tt').datagrid({
                
                 url: '../dpinfo/GetDP.ashx', //请求数据的页面
                 sortName: 'dpname', //排序字段
                 idField: 'dpid', //标识字段,主键
                 iconCls: '', //标题左边的图标
                 width: '830', //宽度
                 //height:'200', //高度
                 nowrap: false, //是否换行，True 就会把数据显示在一行里
                 striped: true, //True 奇偶行使用不同背景色
                 collapsible: false, //可折叠
                 singleSelect: true,
                 sortOrder: 'desc', //排序类型
                 remoteSort: true, //定义是否从服务器给数据排序
                 fitColumns: true,
                 method: 'post',
                 columns: [[
                     //{ field: 'ckb', checkbox: true },
                     { title: '编号', field: 'dpbh', width: 150 },
                     { title: '名称', field: 'dpname', width: 150 }

                 ]],
                 toolbar: "#tab_toolbar",
                 queryParams: { "action": "query" },
                 pagination: true, //是否开启分页
                 pageNumber: 1, //默认索引页
                 pageSize: 20, //默认一页数据条数
                 rownumbers: false //行号
             });


         }
         function InitTree() {
             $('#pt').tree({
                 width: '100%', //宽度  
                 
                 lines: true,
                 //data: provincetree,   
                 url: '../areainfo/GetArea.ashx', //请求数据的页面 
                 method: 'post',
                 queryParams: { "action": "querymyareauser" },
                 onBeforeExpand: function (node) {
                     $("#pt").tree("options").queryParams = { "action": "queryyb" };
                     $('#pt').tree('options').url = "../areainfo/GetArea.ashx?pid=" + node.id;
                 },
                 onClick: function (node) {
                     
                 },
                 onLoadSuccess: function (node, param) {
                     
                 }
             });

         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div class="left">
      <div class="dlmsg gravfont">欢迎登录！消息<asp:HyperLink ID="hlmsg" CssClass="bluefont" runat="server"></asp:HyperLink></div>
      <div class="xtname bluefont">自动虫情监测系统</div>
      <div><asp:Label ID="lblusername" CssClass="gravfont" runat="server" Text=""></asp:Label></div>
      <div class="mymenu"><a href="index.aspx">植信通</a> </div>
      <div class="smenu"><a href="index.aspx">靶标害虫</a></div>
      <div class="smenu"><a href="index.aspx">测报灯</a></div>
      <div class="smenu"><a href="index.aspx">显微成像</a></div>  
      <div class="mytree">
          <div class="mypt" style="overflow:scroll;height:280px;">
<ul id="pt"></ul>
          </div>
          
      </div>    
  </div>
    <div class="right">
        <div style="margin:5px;">
 <table id="tt">
                    </table>
                    <div id="tab_toolbar" style="padding: 4px;">
                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td style="padding-left: 2px">
                                    时间从:  
           <input id="StartTime" class="easyui-datebox" style="width: 100px" />
                            到:  
           <input id="EndTime" class="easyui-datebox" style="width: 100px" />
                            <select id="jd" class="easyui-combobox" name="jd" style="width: 80px;">
                                <option value="季度">季度</option>
                                <option value="一季度">一季度</option>
                                <option value="二季度">二季度</option>
                                <option value="三季度">三季度</option>
                                <option value="四季度">四季度</option>
                                <option value="当天">当天</option>
                            </select>

                            <select id="ptype" class="easyui-combobox" name="ptype" style="width: 60px;">
                                <option value="所有">所有</option>
                                <option value="卵">卵</option>
                                <option value="幼虫">幼虫</option>
                                <option value="蛹">蛹</option>
                                <option value="成虫">成虫</option>
                            </select>                           
                            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="reloadgrid()">查找</a>
                            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="Export('excel', $('#tt'));">导出</a>
                                    <input id="ipt_search" menu="#search_menu" />
                                    <div id="search_menu" style="width: 120px">
                                        <div name="usernum">
                                            类型
                                        </div>
                                        <div name="username">
                                            名称
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
        </div>
       <div style="margin:5px;" >
           <div id="p" class="easyui-panel"   
        style="width:830px;height:170px;padding:10px;background:#fafafa;"   
        data-options="closable:false,collapsible:false,minimizable:false,maximizable:false">   
     <textarea cols="98" rows="7">

     </textarea>
               <div class="btndiv">
                   <div  class="mybtn">发送信息</div>
               </div>

</div>  
       </div>
    </div>
</asp:Content>
